Skip to content

fix: preserve Location query params when completing blob uploads#21

Merged
davidpoblador merged 1 commit intomainfrom
worktree-virtual-crunching-honey
Apr 2, 2026
Merged

fix: preserve Location query params when completing blob uploads#21
davidpoblador merged 1 commit intomainfrom
worktree-virtual-crunching-honey

Conversation

@davidpoblador
Copy link
Copy Markdown
Member

Summary

  • httpx's params= replaces the entire query string on a URL. Docker Distribution registries include a _state HMAC token in the upload Location header; passing params={"digest": ...} on the completing PUT destroyed this token, causing 404 BLOB_UPLOAD_INVALID.
  • Fixed by appending digest= to the Location URL directly, preserving any existing query parameters.
  • Added tests for push_blob_streaming (was untested) and for the _state preservation on both push_blob and push_blob_streaming.

Test plan

  • Unit tests: 4 new tests added, all 64 tests pass
  • End-to-end: verified push_blob and push_blob_streaming against alltuner-docker-registry.long-python.ts.net

🤖 Generated with Claude Code

httpx's params= replaces the entire query string. Docker Distribution
registries include a _state HMAC token in the upload Location URL;
dropping it causes 404 "BLOB_UPLOAD_INVALID" on the completing PUT.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@davidpoblador davidpoblador merged commit 98c486f into main Apr 2, 2026
1 check passed
@davidpoblador davidpoblador deleted the worktree-virtual-crunching-honey branch April 2, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant